package com.lz.football.module.guess
{
	import com.common.utils.Reflection;
	import com.liangzhong.model.footballLottery.vo.MyGuessVo;
	import com.lz.football.module.base.IComponent;
	
	import flash.display.MovieClip;
	import flash.text.TextField;
	
	import lz.controls.LItem;

	/**
	 *我竞猜条目
	 * @author lake
	 * 
	 */	
	public class MyGuessItem extends LItem implements IComponent
	{
		/**
		 *状态标识 
		 */		
		private var flagMc		:MovieClip;
		/**
		 * 时间
		 */		
		private var txtTime	:TextField;
		/**
		 * 标题
		 */		
		private var txtTitle		:TextField;
		/**
		 *我的选项文本 
		 */		
		private var txtGuess		:TextField;
		/**
		 *比赛状态 
		 */		
		private var txtStatus		:TextField;
		/**
		 *赔率 
		 */		
		private var txtRate		:TextField;
		/**
		 *下注额 
		 */		
		private var txtBetValue	:TextField;
		/**
		 *奖励  
		 */		
		private var txtAward		:TextField;
		
		public function MyGuessItem()
		{
			super();
		}
		/**
		 *设置获取数据 
		 * @param value
		 * 
		 */		
		override public function set data(value :*):void
		{
			_data = value;
			var myGuessVo :MyGuessVo = _data;
			txtTitle.htmlText = "" + myGuessVo.guessDetail.descplay;
			txtTime.htmlText = "" + myGuessVo.guessDetail.endDateStr;
			flagMc.gotoAndStop(myGuessVo.sstatus);
			txtGuess.htmlText = "" + myGuessVo.guessStr;
			txtStatus.htmlText = "" + myGuessVo.statusStr;
			txtRate.htmlText = "" + myGuessVo.rate;
			txtBetValue.htmlText = "" + myGuessVo.amtStr;
			txtAward.htmlText = "" + myGuessVo.awardStr;
		}
		override public function get data():*
		{
			return _data;
		}
		/**
		 *初始化 
		 * @param view
		 * 
		 */		
		public function initUI(view:Object=null):void
		{
			_symbolSkin = Reflection.createInstance("com.lz.res.fbLottery.SubItemSKin");
			flagMc = _symbolSkin.flagMc;
			txtTime = _symbolSkin.txtTime;
			txtTitle = _symbolSkin.txtTitle;
			txtGuess = _symbolSkin.txtGuess;
			txtStatus = _symbolSkin.txtStatus;
			txtRate = _symbolSkin.txtRate;
			txtBetValue = _symbolSkin.txtBetValue;
			txtAward = _symbolSkin.txtAward;
			txtTime.htmlText = "";
			txtTitle.htmlText = "";
			txtGuess.htmlText = "";
			txtStatus.htmlText = "";
			txtRate.htmlText = "";
			txtBetValue.htmlText = "";
			txtAward.htmlText = "";
			this.addChild(_symbolSkin);
			addEvtListener();
		}
		/**
		 *添加事件 
		 * 
		 */		
		public function addEvtListener():void
		{
		}
		/**
		 *删除事件 
		 * 
		 */		
		public function removeEvtListener():void
		{
		}
		/**
		 *销毁 
		 * 
		 */		
		public function destroyView():void
		{
		}
	}
}